# -*- coding: utf-8 -*-
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
import spiders.zhihu.zhihu_answer_voter_and_comment_base as base_prog

if __name__ == '__main__':
    completed = 0
    offset = 50000
    limit = 10000
    table_suffix = '_offset%slimit%s' % (offset, limit)
    base_prog.WorkContext.PROXY_URL = '114.215.174.98:16816'
    base_prog.WorkContext.COOKIE_FILE = ['13064517926_login', '17174037436_login']
    base_prog.WorkContext.MODULE_NAME = 'zhihu_answer_voter_and_comment' + table_suffix
    base_prog.WorkContext.COMMENT_TABLE_NAME += table_suffix
    base_prog.WorkContext.VOTER_TABLE_NAME += table_suffix
    base_prog.Workshop(bulk_size=100, offset=offset + completed, limit=limit - completed, worker_count=8).start_work()